package spring.test;

import org.testng.annotations.Test;
import spring.model.Person;


public class TwoPerson {

    @Test
    public void test() {
        Person p = new Person();
        p.setAge(1);
        p.setName("Tile");

        Person p2 = new Person();
        org.springframework.beans.BeanUtils.copyProperties(p, p2);
        p.setAge(3);
        p.setName("ll");
        System.out.println(p2.getAge());
        System.out.println(p2.getName());
        System.out.println(p.getAge());
        System.out.println(p.getName());

    }
}
